﻿//Create By Leven
//Copyright 2008 LevenStudio
//http://leven.com.cn/
//For LevenBlog2.0
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace LevenBlog.Core.Entities
{
    /// <summary>
    ///表lb_category
    /// </summary>
    [Serializable]
    [DataContract(Name = "category")]
    [Table("lb_category", Info = "")]
    public class lb_category : BaseEntity
    {
        [DataMember]
        [Column("id", DataType.Int32, Length = 4, CanNull = false, AutoIncrement = true, PrimaryKey = true)]
        public int id { get; set; }

        [DataMember]
        [Column("name", DataType.VarChar, Length = 510, CanNull = false)]
        public string name { get; set; }

        [DataMember]
        [Column("info", DataType.VarChar, Length = 1000)]
        public string info { get; set; }

        [DataMember]
        [Column("order", DataType.Int32, Length = 4, CanNull = false)]
        public int order { get; set; }

        [DataMember]
        [Column("isurl", DataType.Bit, CanNull = false)]
        public bool isurl { get; set; }

        [DataMember]
        [Column("url", DataType.VarChar, Length = 510)]
        public string url { get; set; }

        [DataMember]
        [Column("image", DataType.VarChar, Length = 510)]
        public string image { get; set; }

        [DataMember]
        [Column("view", DataType.Int16, Length = 1, CanNull = false)]
        public Int16 view { get; set; }

        [DataMember]
        [Column("num", DataType.Int32, Length = 4, CanNull = false)]
        public int num { get; set; }

        public lb_category()
        {
            this.id = -1;
            this.image = string.Empty;
            this.info = string.Empty;
            this.isurl = false;
            this.name = string.Empty;
            this.num = 0;
            this.order = 1000;
            this.url = string.Empty;
            this.view = 0;
        }

    }
}

